package com.aaa.examine.service.impl;

import com.aaa.entity.CareOrderItem;
import com.aaa.entity.CheckResult;

import com.aaa.examine.mapper.CareOrderItemMapper;

import com.aaa.examine.service.CareOrderItemService;

import com.aaa.examine.vo.CheckItemVo;
import com.aaa.examine.vo.CheckVo;
import com.aaa.vo.Result;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.util.List;

/**
 * IntelliJ IDEA
 * CareOrderItemServiceImpl
 * 好好学习天天练
 *
 * @author caojianbin
 * 2023/3/29
 */
@Service
public class CareOrderItemServiceImpl  implements CareOrderItemService {
    @Resource
    private CareOrderItemMapper careOrderItemMapper;


    //未检查患者
    @Override
    public Result<IPage<CheckResult>> queryAll(Integer current, Integer size, CheckVo checkVo) {
        IPage page = new Page(current, size);
        IPage<CheckResult> checkResultIPage = careOrderItemMapper.serlctAll(page, checkVo);
        return new Result<>(200,"成功",checkResultIPage);
    }

    @Override
    public Result<List<CareOrderItem>> selectOrderAll(CheckItemVo checkItemVo) {
        List checkItemIds = checkItemVo.getCheckItemIds();
        String regId = checkItemVo.getRegId();
       List<CareOrderItem> careOrderItems =  careOrderItemMapper.selectOrderAll(checkItemIds,regId);
        return new Result<>(200,"查询所有检查",careOrderItems);
    }





}
